function getAllBooks(){
 var userId = sessionStorage.getItem("userId");
// console.log(userId);
   var params={};
   var ROOT='http://www.youyiku-yishu.cn';
     $.ajax({
		    type:"POST",
		    url:"http://www.youyiku-yishu.cn/WebApp/AppIndex/getAllBooks",
		    data:{userId:userId},
		    dataType:"json",
		       beforeSend: function (XMLHttpRequest) {
		         		XMLHttpRequest.setRequestHeader("DEVICEINFO", "JxRaZezavm3HXM3d9pWnYiqqQC1SJbsU");
		       }
		  }).then(data=>{
		  	console.log(data)
        var wxBook=data.wxBook;
        var wbBooks=data.wbBooks;
        var qqBooks=data.qqBooks;
        var photoBooks=data.photoBooks;
        var qqPhotoBooks=data.qqPhotoBooks;
    
        if(!wxBook && !wbBooks && !qqBooks &&  !photoBooks && !qqPhotoBooks){ 
        	$('.beijin').css('display','block');  
        }else{	   
        var page="";
        <!--微信书-->
        if(wxBook){
            page+='<section class="clear Wechat">';
            page+='<div class="main-left" onclick="wxedit('+wxBook.bookId+')">';
            page+='<div class="imgbox1"></div>';
            page+='<div class="center">';
            page+='<div class="'+wxBook.css1+'">';
            page+='<div class="textname">';
            page+='<h4 style="text-align:right;font-family: fzxsjt;color: #3C3C3C;font-weight:normal;font-size:0.213333rem;">'+wxBook.bookname+'</h4>';
            page+='<p style="text-align:right;color:#3C3C3C;font-family: fzxsjt;">'+wxBook.name+'·作品</p>';
            page+='</div>';
            page+='</div>';
            page+='<div class="'+wxBook.css2+'">';
            page+='<div class="bookimg">';
            if(wxBook.wximg){
                if(wxBook.wximg.toString().indexOf('load')>0){
                    page+='<img src=" '+ROOT +'/'+wxBook.wximg+'" class="shape_'+wxBook.shape+'" alt="2">';
                }else{
                    page+='<img src="'+ROOT +'/'+wxBook.wximg+'" class="img absolute alt none" alt="2">';
                }
            }
            page+='</div>';
            page+='</div>';
            page+='<div class="booktext">优忆库-出品</div>';
            page+='</div>';
            page+='</div>';
            page+='<div class="main-right">';
            page+='<div class="main-right-top">';
            page+='<div class="icon"><img src="'+ROOT +'/Apps/WebApp/View/default/images/my_bookshelf_wechat_icon_nor.png" style="width:100%;height:100%;"></div>';
            page+='<div class="bookname">';
            page+='<a class="bookname_a">'+wxBook.bookname+'</a><br>';
            page+='<a class="wxpage" style="font-size:0.266667rem;color: #646464;">';
            page+='<p>共'+wxBook.page+'页</p>';
            page+='</a><br />';
            page+='<a class="bookname_a1">';
            page+='<p>'+wxBook.name+'</p>';
            page+='</a>';
            page+='<br>';
            page+='<p class="bokname_p">';
            page+='<a>'+wxBook.wxyear+'年'+wxBook.wxmonth+'月'+wxBook.wxday+'日</a>';
            page+='</p>';
            page+='<input class="wxNum" type="hidden" value="'+wxBook.wxNumber+'">';
            page+='<div class="photos wxredobook" style="display:none">';
            page+='<div class="photo_zhao"></div>';
            page+='<div class="photo_container">';
            page+='<div class="photo_top mui-pull-left">是否确认更新</div>';
            page+='<div class="photo_left mui-pull-left photo_color" onclick="wxredo()">确定</div>';
            page+='<div class="photo_left photo_right mui-pull-left" onclick="wxcloseArea();">取消</div>';
            page+='</div>';
            page+='</div>';
            page+='</div>';
            page+='</div>';
            page+='<div class="main-right-bot">';
            page+='<div class="button clear wxbutton">';
            page+='<div class="buy" onclick="wxbuy('+wxBook.wxgoodsId+',this)">';
            page+='<img src="'+ROOT +'/Apps/WebApp/View/default/images/goumai.png">';
            page+='<a>购买书本</a>';
            page+='</div>';
            page+='<div class="edit" onclick="wxedit('+wxBook.bookId+')">';
            page+='<img src="'+ROOT +'/Apps/WebApp/View/default/images/bianji.png">';
            page+='<a>编辑书本</a>';
            page+='</div>';
            page+='</div>';
            page+='</div>';
            page+='</div>';
            page+='</section>';
        }

        <!--qq空间说说书-->
        if(qqBooks){
            for(var i=0;i<qqBooks.length;i++){
                page+='<section class="clear QQspace">';
                page+='<div class="main-left" onclick="qqedit('+qqBooks[i].qqbookId+',this)">';
                page+='<div class="center">';
                page+='<div class="'+qqBooks[i].css1+'">';
                page+='<div class="textname">';
                page+='<h4 style="text-align:right;font-family: fzxsjt;color: #3C3C3C;font-weight:normal;font-size:0.213333rem;">'+qqBooks[i].bookname+'</h4>';
                page+='<p style="text-align:right;color:#3C3C3C;font-family: fzxsjt;">'+qqBooks[i].name+'·作品</p>';
                page+='</div>';
                page+='</div>';
                page+='<div class="'+qqBooks[i].css2+'">';
                page+='<div class="bookimg">';
                if(qqBooks[i].image.toString().indexOf('pload')>0){
                    page+='<img src="'+ROOT +'/'+qqBooks[i].image+'" class="img absolute alt none uploadimg" alt="2">';
                }else{
                    page+='<img src="'+ROOT +'/'+qqBooks[i].image+'" class="img absolute alt none" alt="2">';
                }
                page+='</div>';
                page+='</div>';
                page+='<div class="booktext">优忆库-出品</div>';
                page+='</div>';
                page+='</div>';
                page+='<div class="main-right">';
                page+='<div class="main-right-top">';
                page+='<div class="icon"><img src="'+ROOT +'/Apps/WebApp/View/default/images/my_bookshelf_qq_icon_nor.png" style="width:100%;height:100%;"></div>';
                page+='<div class="bookname">';
                page+='<a class="bookname_a">'+qqBooks[i].bookname+'</a><br>';
                page+='<a class="wxpage" style="font-size:0.266667rem;color: #646464;">';
                page+='<p>共'+qqBooks[i].page+'页</p>';
                page+='</a><br />';
                page+='<a class="bookname_a1">';
                page+='<p>'+qqBooks[i].name+'</p>';
                page+='</a>';
                page+='<br>';
                page+='<p class="bokname_p">';
                page+='<a>修改于'+qqBooks[i].qqyear+'年'+qqBooks[i].qqmonth+'月'+qqBooks[i].qqday+'日</a>';
                page+='</p>';
                page+='<div class="photos qqredobook_'+i+'" style="display:none">';
                page+='<div class="photo_zhao"></div>';
                page+='<div class="photo_container">';
                page+='<div class="photo_top mui-pull-left">是否确认更新</div>';
                page+='<div class="photo_left mui-pull-left photo_color" onclick="qqredo('+qqBooks[i].qqbookId+','+i+')">确定</div>';
                page+='<div class="photo_left photo_right mui-pull-left" onclick="qqcloseArea('+i+');">取消</div>';
                page+='</div>';
                page+='</div>';
                page+='</div>';
                page+='</div>';
                page+='<div class="main-right-bot">';
                page+='<div class="button clear qqbutton_'+i+'">';
                page+='<div class="buy" onclick="wxbuy('+qqBooks[i].qqgoodsId+',this)">';
                page+='<img src="'+ROOT +'/Apps/WebApp/View/default/images/goumai.png">';
                page+='<a>购买书本</a>';
                page+='</div>';
                page+='<div class="edit" onclick="qqedit('+qqBooks[i].qqbookId+',this)">';
                page+='<img src="'+ROOT +'/Apps/WebApp/View/default/images/bianji.png">';
                page+='<a>编辑书本</a>';
                page+='</div>';
                page+='</div>';
                page+='</div>';
                page+='</div>';
            }
        }

        <!--微博书-->
        if(wbBooks){
            for(var i=0;i<wbBooks.length;i++){
                page+='<section class="clear microblog">';
                page+='<div class="main-left" onclick="wbedit('+wbBooks[i].wbbookId+',this)">';
                page+='<div class="center">';
                page+='<div class="'+wbBooks[i].css1+'">';
                page+='<div class="textname">';
                page+='<h4 style="text-align:right;font-family: fzxsjt;color: #3C3C3C;font-weight:normal;font-size:0.213333rem;">'+wbBooks[i].bookname+'</h4>';
                page+='<p style="text-align:right;color:#3C3C3C;font-family: fzxsjt;">'+wbBooks[i].name+'</p>';
                page+='</div>';
                page+='</div>';
                page+='<div class="'+wbBooks[i].css2+'">';
                page+='<div class="bookimg">';
                if(wbBooks[i].image.toString().indexOf('pload')>0){
                    page+='<img src="'+ROOT +'/'+wbBooks[i].image+'" class="shape_'+wbBooks[i].shape+'" alt="2">';
                }else{
                    page+='<img src="'+ROOT +'/'+wbBooks[i].image+'" class="img absolute alt none" alt="2">';
                }
                page+='</div>';
                page+='</div>';
                page+='<div class="booktext">优忆库-出品</div>';
                page+='</div>';
                page+='</div>';
                page+='<div class="main-right">';
                page+='<div class="main-right-top">';
                page+='<div class="icon"><img src="'+ROOT +'/Apps/WebApp/View/default/images/my_bookshelf_weibo_icon_nor.png" style="width:100%;height:100%;"></div>';
                page+='<div class="bookname">';
                page+='<a class="bookname_a">'+wbBooks[i].bookname+'</a><br>';
                page+='<a class="wxpage" style="font-size:0.266667rem;color: #646464;">';
                page+='<p>共'+wbBooks[i].page+'页</p>';
                page+='</a><br />';
                page+='<a class="bookname_a1">';
                page+='<p>'+wbBooks[i].name+'</p>';
                page+='</a><br>';
                page+='<p class="bokname_p">';
                page+='<a>修改于'+wbBooks[i].wbyear+'年'+wbBooks[i].wbmonth+'月'+wbBooks[i].wbday+'日</a>';
                page+='</p>';
                page+='<div class="photos wbredobook_'+i+'" style="display:none">';
                page+='<div class="photo_container">';
                page+='<div class="photo_top mui-pull-left">是否确认更新</div>';
                page+='<div class="photo_left mui-pull-left photo_color" onclick="wbredo('+wbBooks[i].wbbookId+','+i+')">确定</div>';
                page+='<div class="photo_left photo_right mui-pull-left" onclick="wbcloseArea('+i+');">取消</div>';
                page+='</div>';
                page+='</div>';
                page+='</div>';
                page+='</div>';
                page+='<div class="main-right-bot">';
                page+='<div class="button clear wbbutton_'+i+'">';
                page+='<div class="buy" onclick="wxbuy('+wbBooks[i].wbgoodsId+',this)">';
                page+='<img src="'+ROOT +'/Apps/WebApp/View/default/images/goumai.png">';
                page+='<a>购买书本</a>';
                page+='</div>';
                page+='<div class="edit" onclick="wbedit('+wbBooks[i].wbbookId+',this)">';
                page+='<img src="'+ROOT +'/Apps/WebApp/View/default/images/bianji.png">';
                page+='<a>编辑书本</a>';
                page+='</div>';
                page+='</div>';
                page+='</div>';
                page+='</div>';
                page+='</section>';
            }
        }

        <!--照片书-->
        if(photoBooks){
            for(var i=0;i<photoBooks.length;i++){
                page+='<section class="clear photobook_'+i+' photograph">';
                if(photoBooks[i].master==1){
                    if(photoBooks[i].status!=1){
                        page+='<div  class="del del'+i+'">';
                        page+='<img src="'+ROOT +'/Apps/WebApp/View/default/images/del.png" alt="" onclick="del_books('+photoBooks[i].photoBookId+','+i+')"/>';
                        page+='<a onclick="deletePhotoBook()">确认删除本书</a>';
                        page+='</div>';
                        page+='<div  class="request request'+i+'">';
                        page+='<img src="'+ROOT +'/Apps/WebApp/View/default/images/yq.png" alt="" onclick="request('+i+')"/>';
                        page+='<a class="request_a"  onclick="addfriend('+photoBooks[i].photoBookId+')">邀请好友制作</a>';
                        page+='</div>';
                    }
                }
                page+='<div class="main-left" onclick="phOpen('+photoBooks[i].photoBookId+','+photoBooks[i].status+')">';
                page+='<div class="mian1_header '+photoBooks[i].css1+'">'+photoBooks[i].bookName+'</div>';
                page+='<div class="mian1_bottom '+photoBooks[i].css2+'">'+photoBooks[i].title+'</div>';
                page+='<div class="photo_book">';
                if(photoBooks[i].personImg){
                    if(photoBooks[i].cover.toString().indexOf('cover_1')>0){
                        page+='<div class="'+photoBooks[i].imgbox+'"><img src="'+ROOT +'/'+photoBooks[i].personImg+'" class="shape_'+photoBooks[i].shape+'"></div>';
                    }else if(photoBooks[i].cover.toString().indexOf('cover_2')>0){
                        page+='<div class="'+photoBooks[i].imgbox+'"><img src="'+ROOT +'/'+photoBooks[i].personImg+'" class="shape_'+photoBooks[i].shape+'"></div>';
                    }
                    else if(photoBooks[i].cover.toString().indexOf('cover_3')>0){
                        page+='<div class="'+photoBooks[i].imgbox+'"><img src="'+ROOT +'/'+photoBooks[i].personImg+'" class="shape_'+photoBooks[i].shape+'"></div>';
                    }
                }
                page+='<img src="'+ROOT +'/'+photoBooks[i].cover+'" class="img">';
                page+='</div>';
                page+='</div>';
                page+='<div class="main-right" onclick="hide('+i+')">';
                page+='<div class="main-right-top">';
                page+='<div class="bookname">';
                page+='<a class="bookname_a">'+photoBooks[i].bookName+'</a><br>';
                page+='<a class="bookname_a2 invite"></a>';
                page+='<a class="wxpage wxpage_1" style="font-size:0.266667rem;color: #646464;">';
                page+='<p>共'+photoBooks[i].page+'页</p>';
                page+='</a><br />';
                page+='<a class="bookname_a1">';
                page+='<p>'+photoBooks[i].title+'</p>';
                page+='</a><br>';
                page+='<p class="bokname_p">';
                page+='<a>'+photoBooks[i].friendTime+'</a>';
                page+='</p>';
                page+='</div>';
                page+='</div>';
                page+='<div class="main-right-bot">';
                page+='<div class="button clear">';
                if(photoBooks[i].master==1){
                    page+='<div class="buy" onclick="phbuy('+photoBooks[i].photoBookId+',this)"><input style="display:none" value="">';
                    page+='<input style="display:none" value="">';
                    page+='<img src="'+ROOT +'/Apps/WebApp/View/default/images/goumai.png">';
                    page+='<a>购买书本</a>';
                    page+='</div>';
                    page+='<div class="edit" onclick="phedit('+photoBooks[i].photoBookId+','+photoBooks[i].status+',this)">';
                    page+='<img src="'+ROOT +'/Apps/WebApp/View/default/images/bianji.png">';
                    page+='<a>编辑书本</a>';
                    page+='</div>';

                }else{

                    page+='<div class="edit" onclick="phedit('+photoBooks[i].pbId+','+photoBooks[i].status+',this)">';
                    page+='<img src="'+ROOT +'/Apps/WebApp/View/default/images/bianji.png">';
                    page+='<a>编辑书本</a>';
                    page+='</div>';
                }
                page+='</div>';
                page+='</div>';
                page+='</div>';
                page+='</section>';
            }
        }


        <!--qq空间相册书-->
        if(qqPhotoBooks){
            for(var i=0;i<qqPhotoBooks.length;i++){
                page+='<section class="clear spaceImg">';
                page+='<div class="main-left" onclick="qhOpen('+qqPhotoBooks[i].qbId+')">';
                page+='<div class="photo_book">';
                if(qqPhotoBooks[i].personImg)
                    if(qqPhotoBooks[i].coverId==1){
                        page+='<div class="imgbox1"><img src="'+ROOT +'/'+qqPhotoBooks[i].personImg+'" class="shape_'+qqPhotoBooks[i].shape+'"></div>';
                    }else if(qqPhotoBooks[i].coverId==2){
                        page+='<div class="imgbox2"><img src="'+ROOT +'/'+qqPhotoBooks[i].personImg+'" class="shape_'+qqPhotoBooks[i].shape+'">';
                    }else if(qqPhotoBooks[i].coverId==3){
                        page+='<div class="imgbox3"><img src="'+ROOT +'/'+qqPhotoBooks[i].personImg+'" class="shape_'+qqPhotoBooks[i].shape+'"></div>';
                    }
                page+='<img src="'+ROOT +'/'+qqPhotoBooks[i].cover+'" class="img">';
                page+='<div class="mian1_header '+qqPhotoBooks[i].css1+'">'+qqPhotoBooks[i].bookName+'</div>';
                page+='<div class="mian1_bottom '+qqPhotoBooks[i].css2+'">'+qqPhotoBooks[i].title+'</div>';
                page+='</div>';
                page+='</div>';
                page+='<div class="main-right">';
                page+='<div class="main-right-top">';
                page+='<div class="icon"><img src="'+ROOT +'/Apps/WebApp/View/default/images/my_share_qqphoto_icon_nor.png" style="width:100%;height:100%;"></div>';
                page+='<div class="bookname">';
                page+='<a class="bookname_a">'+qqPhotoBooks[i].author+'</a><br>';
                page+='<a class="wxpage" style="font-size:0.266667rem;color: #646464;">';
                page+='<p>共'+qqPhotoBooks[i].page+'}页</p>';
                page+='</a><br />';
                page+='<a class="bookname_a1">';
                page+='<p>'+qqPhotoBooks[i].author+'</p>';
                page+='</a>';
                page+='<br>';
                page+='<p class="bokname_p">';
                page+='<a>'+qqPhotoBooks[i].friendTime+'</a>';
                page+='</p>';
                page+='</div>';
                page+='</div>';
                page+='<div class="main-right-bot">';
                page+='<div class="button clear">';
                if(qqPhotoBooks[i].master==1){
                    page+='<div class="buy" onclick="qhbuy('+qqPhotoBooks[i].qbId+',this)"><input style="display:none" value="">';
                    page+='<input style="display:none" value="">';
                    page+='<img src="'+ROOT +'/Apps/WebApp/View/default/images/goumai.png">';
                    page+='<a>购买书本</a>';
                    page+='</div>';
                    page+='<div class="edit" onclick="qhedit('+qqPhotoBooks[i].qbId+',this)">';
                    page+='<img src="'+ROOT +'/Apps/WebApp/View/default/images/bianji.png">';
                    page+='<a>编辑书本</a>';
                    page+='</div>';
                }else{
                    page+='<div class="edit" onclick="qhedit('+qqPhotoBooks[i].qbId+',this)">';
                    page+='<img src="'+ROOT +'/Apps/WebApp/View/default/images/bianji.png">';
                    page+='<a>编辑书本</a>';
                    page+='</div>';
                }
                page+='</div>';
                page+='</div>';
                page+='</div>';
                page+='</section>';
            }
             
        }
         $('.main').html(page);
    }
//}   

    });








}